package com.sunxcloud.rabbitmq.consumer;

import com.sunxcloud.common.core.constant.IProcessor;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.Message;

/**
 * 消费者业务类
 */
@EnableBinding(IProcessor.class)
public class ConsumerService {

    @StreamListener(IProcessor.INPUT_MESSAGE)
    public void input(Message<String> message) {
        System.out.println("消费者02号："+ message.getPayload());
    }
}
